package org.example.domain.activity.service.quota;

import org.example.domain.activity.model.entity.ActivityCountEntity;
import org.example.domain.activity.model.entity.ActivityEntity;
import org.example.domain.activity.model.entity.ActivitySkuEntity;
import org.example.domain.activity.repository.IActivityRepository;
import org.example.domain.activity.service.quota.rule.IActivityChain;
import org.example.domain.activity.service.quota.rule.factory.DefaultActivityChainFactory;

public class RaffleActivityAccountQuotaSupport {
    protected IActivityRepository activityRepository;
    protected DefaultActivityChainFactory defaultActivityChainFactory;
    public RaffleActivityAccountQuotaSupport(IActivityRepository activityRepository, DefaultActivityChainFactory defaultActivityChainFactory){
        this.activityRepository = activityRepository;
        this.defaultActivityChainFactory = defaultActivityChainFactory;

    }
    public ActivitySkuEntity queryActivitySkuEntityBysku(Long sku){
        return activityRepository.queryActivitySkuEntityBysku(sku);
    }
    public ActivityEntity queryActivityEntityByactivityId(Long activityId){
        return activityRepository.queryActivityEntityByactivityId(activityId);
    }
    public ActivityCountEntity queryRaffleActivityCountByActivityCountId(Long activityCountId){
        return activityRepository.queryRaffleActivityCountByActivityCountId(activityCountId);
    }
    public IActivityChain openActivityChain(){
        return defaultActivityChainFactory.openActivityChain();
    }


}
